package com.system.demo.mapper.comment;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.system.demo.entity.comment.ReplyComment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface ReplyCommentMapper extends BaseMapper<ReplyComment> {

    //根据uid获取参与过的所有留言id
    @Select("SELECT DISTINCT comment_id FROM reply_comment WHERE from_id = #{uid}")
    List<Integer> selectCommentIdsByUserId(@Param("uid") String uid);
}
